<%@ Page Language="C#" AutoEventWireup="true" Inherits="Guestbook.Page.GuestBookPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link rel="stylesheet" type="text/css" href="css/styles.css" />

    <script type="text/javascript" language="javascript" src="/js/common.js"></script>

    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <div align="center">
            <font size="5"><b>
                <asp:Literal ID="lblTitle" runat="server"></asp:Literal></b></font>
            <br />
            <br />
            <!-- google_ad_section_start(weight=ignore) -->
            <a href="#write">Post new</a> -
            <asp:HyperLink ID="lnkViewAll" runat="server">View all pages</asp:HyperLink>
            - <a target="_blank" href="/">Create new guestbook</a><br />
            <p>
                <font size="1">Total <b>
                    <asp:Literal ID="lblTotalVisiters" runat="server"></asp:Literal></b> visitors and
                    <b>
                        <asp:Literal ID="lblTotalMessages" runat="server"></asp:Literal></b> messages
                    in this guestbook.<br />
                    Last message was posted at <b>
                        <asp:Literal ID="lblLastPost" runat="server"></asp:Literal></b>.</font>
            </p>
            <br />
            <b>Now listing
                <asp:Literal ID="lblPageSize" runat="server"></asp:Literal>
                messages, from number
                <asp:Literal ID="lblFrom" runat="server"></asp:Literal>
                to
                <asp:Literal ID="lblTo" runat="server"></asp:Literal></b><br />
            <br />
            <br />
        </div>
        <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="repTable_ItemDataBound">
            <ItemTemplate>
                <p>
                    <table align="center" width="480" border="0" cellspacing="0" cellpadding="1" bgcolor="#CCD0D6">
                        <td>
                            <table width="100%" border="0" cellspacing="3" cellpadding="0" bgcolor="#F4F4F4">
                                <tr bgcolor="#FBFBFB">
                                    <td>
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td valign="top">
                                                    <font color="#555555" size="2" style="font-size: 8pt;"><b>Date:&nbsp;&nbsp;</b></font></td>
                                                <td>
                                                    <font color="#555555" size="2" style="font-size: 8pt;">
                                                        <%# DataBinder.Eval(Container.DataItem, "DateCreation")%>
                                                    </font>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top">
                                                    <font color="#555555" size="2" style="font-size: 8pt;"><b>Name:&nbsp;&nbsp;</b></font></td>
                                                <td>
                                                    <font color="#555555" size="2" style="font-size: 8pt;">
                                                        <%# DataBinder.Eval(Container.DataItem, "Author")%>
                                                    </font>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top">
                                                    <font color="#555555" size="2" style="font-size: 8pt;"><b>Email:&nbsp;&nbsp;</b></font></td>
                                                <td>
                                                    <%# DataBinder.Eval(Container.DataItem, "UserEmail")%>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top">
                                                    <font color="#555555" size="2" style="font-size: 8pt;"><b>Number:&nbsp;&nbsp;</b></font></td>
                                                <td>
                                                    <font color="#555555" size="2" style="font-size: 8pt;">
                                                        <%# DataBinder.Eval(Container.DataItem, "Id", "{0:N0}")%>
                                                    </font>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr height="1" bgcolor="#DFDFDF">
                                    <td>
                                    </td>
                                </tr>
                                <tr height="2" bgcolor="#F4F4F4">
                                    <td>
                                    </td>
                                </tr>
                                <tr bgcolor="#F4F4F4">
                                    <td>
                                        <font size="2" face="Verdana, tahoma, helvetica, arial" color="#000000">
                                            <div>
                                                <%# DataBinder.Eval(Container.DataItem, "Content")%>
                                                <span style="line-height: 5pt;">
                                                    <br>
                                                    <br>
                                                </span>
                                            </div>
                                        </font>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </table>
                </p>
            </ItemTemplate>
            <FooterTemplate>
                <div align="center">
                    <p>
                        <asp:HyperLink ID="lnkNextPage" Text="View next page" runat="server"></asp:HyperLink>
                        -
                        <asp:DropDownList ID="ddlPages" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPages_SelectedIndexChanged">
                        </asp:DropDownList>
                        -
                        <asp:HyperLink ID="lnkAllPage" Text="View
                        all pages" runat="server"></asp:HyperLink>
                    </p>
                </div>
            </FooterTemplate>
        </asp:Repeater>
        <br />
        <a name="write" />
        <table align="center" width="480" border="0" cellspacing="0" cellpadding="1" bgcolor="#999999">
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="1" cellpadding="10" bgcolor="#F0F0F0">
                        <tr>
                            <td>
                                <table border="0" width="100%">
                                    <tr>
                                        <td colspan="2">
                                            <font size="4"><b>Post new message</b></font><p>
                                                For security reasons you can not post any links to other websites in this guestbook.
                                                This is an option that can be turned off.
                                                <br />
                                                &nbsp;</p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="middle">
                                            <b>Name&nbsp;<font size="1">*</font></b>&nbsp;&nbsp;</td>
                                        <td width="80%" valign="bottom">
                                            <asp:TextBox ID="txtUserName" runat="server" MaxLength="64" Width="95%"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td valign="middle">
                                            <b>Email</b>&nbsp;&nbsp;</td>
                                        <td valign="bottom">
                                            <asp:TextBox ID="txtEmail" runat="server" MaxLength="128" Width="95%"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="middle">
                                            <b>Website</b>&nbsp;&nbsp;</td>
                                        <td valign="bottom">
                                            <asp:TextBox ID="txtWebsite" runat="server" Text="http://" MaxLength="192" Width="95%"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td valign="top">
                                            <b>Message&nbsp;<font size="1">*</font></b></td>
                                        <td width="60%" valign="bottom">
                                            <asp:TextBox ID="txtMesage" runat="server" Width="95%" Rows="6" TextMode="MultiLine"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;</td>
                                        <td>
                                            <br />
                                            <asp:Button ID="btnPost" runat="server" Text="Post message" OnClick="btnPost_Click" />
                                            <input onclick="return confirm('Are you sure you want to clear (reset) all text you have written and start over?')"
                                                type="reset" name="resetbutton" value="Reset" /></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <div align="center">
            <br />
            <br />
            <a href="/">Back to the website</a> -
            <asp:HyperLink ID="lnkLogin" runat="server">Login and change settings</asp:HyperLink>
            <br />
            <br />
            <b>Get your own free guestbook from <a target="_blank" href="#">smartgb.com</a> </b>
        </div>
    </form>
</body>
</html>
